<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<title>ParsePush</title>
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="ParsePush";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../com/parse/package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/ParsePush.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../com/parse/ParseObject.html" title="class in com.parse"><span class="strong">Prev Class</span></a></li>
<li><a href="../../com/parse/ParsePushBroadcastReceiver.html" title="class in com.parse"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?com/parse/ParsePush.html" target="_top">Frames</a></li>
<li><a href="ParsePush.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">com.parse</div>
<h2 title="Class ParsePush" class="title">Class ParsePush</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://developer.android.com/reference/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></li>
<li>
<ul class="inheritance">
<li>com.parse.ParsePush</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="strong">ParsePush</span>
extends <a href="http://developer.android.com/reference/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">The <code>ParsePush</code> is a local representation of data that can be sent as a push notification.
 <p/>
 The typical workflow for sending a push notification from the client is to construct a new
 <code>ParsePush</code>, use the setter functions to fill it with data, and then use
 <a href="../../com/parse/ParsePush.html#sendInBackground()"><code>ParsePush.sendInBackground()</code></a> to send it.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../com/parse/ParsePush.html#ParsePush()">ParsePush</a></strong>()</code>
<div class="block">Creates a new push notification.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../com/parse/ParsePush.html#clearExpiration()">clearExpiration</a></strong>()</code>
<div class="block">Clears both expiration values, indicating that the notification should never expire.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../com/parse/ParsePush.html#send()">send</a></strong>()</code>
<div class="block">Sends this push notification while blocking this thread until the push notification has
 successfully reached the Parse servers.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://boltsframework.github.io/docs/android/bolts/Task.html?is-external=true" title="class or interface in bolts">Task</a>&lt;<a href="http://developer.android.com/reference/java/lang/Void.html?is-external=true" title="class or interface in java.lang">Void</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../com/parse/ParsePush.html#sendDataInBackground(org.json.JSONObject,%20com.parse.ParseQuery)">sendDataInBackground</a></strong>(<a href="http://developer.android.com/reference/org/json/JSONObject.html?is-external=true" title="class or interface in org.json">JSONObject</a>&nbsp;data,
                    <a href="../../com/parse/ParseQuery.html" title="class in com.parse">ParseQuery</a>&lt;<a href="../../com/parse/ParseInstallation.html" title="class in com.parse">ParseInstallation</a>&gt;&nbsp;query)</code>
<div class="block">A helper method to concisely send a push to a query.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../com/parse/ParsePush.html#sendDataInBackground(org.json.JSONObject,%20com.parse.ParseQuery,%20com.parse.SendCallback)">sendDataInBackground</a></strong>(<a href="http://developer.android.com/reference/org/json/JSONObject.html?is-external=true" title="class or interface in org.json">JSONObject</a>&nbsp;data,
                    <a href="../../com/parse/ParseQuery.html" title="class in com.parse">ParseQuery</a>&lt;<a href="../../com/parse/ParseInstallation.html" title="class in com.parse">ParseInstallation</a>&gt;&nbsp;query,
                    <a href="../../com/parse/SendCallback.html" title="interface in com.parse">SendCallback</a>&nbsp;callback)</code>
<div class="block">A helper method to concisely send a push to a query.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://boltsframework.github.io/docs/android/bolts/Task.html?is-external=true" title="class or interface in bolts">Task</a>&lt;<a href="http://developer.android.com/reference/java/lang/Void.html?is-external=true" title="class or interface in java.lang">Void</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../com/parse/ParsePush.html#sendInBackground()">sendInBackground</a></strong>()</code>
<div class="block">Sends this push notification in a background thread.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../com/parse/ParsePush.html#sendInBackground(com.parse.SendCallback)">sendInBackground</a></strong>(<a href="../../com/parse/SendCallback.html" title="interface in com.parse">SendCallback</a>&nbsp;callback)</code>
<div class="block">Sends this push notification in a background thread.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://boltsframework.github.io/docs/android/bolts/Task.html?is-external=true" title="class or interface in bolts">Task</a>&lt;<a href="http://developer.android.com/reference/java/lang/Void.html?is-external=true" title="class or interface in java.lang">Void</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../com/parse/ParsePush.html#sendMessageInBackground(java.lang.String,%20com.parse.ParseQuery)">sendMessageInBackground</a></strong>(<a href="http://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;message,
                       <a href="../../com/parse/ParseQuery.html" title="class in com.parse">ParseQuery</a>&lt;<a href="../../com/parse/ParseInstallation.html" title="class in com.parse">ParseInstallation</a>&gt;&nbsp;query)</code>
<div class="block">A helper method to concisely send a push message to a query.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../com/parse/ParsePush.html#sendMessageInBackground(java.lang.String,%20com.parse.ParseQuery,%20com.parse.SendCallback)">sendMessageInBackground</a></strong>(<a href="http://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;message,
                       <a href="../../com/parse/ParseQuery.html" title="class in com.parse">ParseQuery</a>&lt;<a href="../../com/parse/ParseInstallation.html" title="class in com.parse">ParseInstallation</a>&gt;&nbsp;query,
                       <a href="../../com/parse/SendCallback.html" title="interface in com.parse">SendCallback</a>&nbsp;callback)</code>
<div class="block">A helper method to concisely send a push message to a query.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../com/parse/ParsePush.html#setChannel(java.lang.String)">setChannel</a></strong>(<a href="http://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;channel)</code>
<div class="block">Sets the channel on which this push notification will be sent.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../com/parse/ParsePush.html#setChannels(java.util.Collection)">setChannels</a></strong>(<a href="http://developer.android.com/reference/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="http://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;channels)</code>
<div class="block">Sets the collection of channels on which this push notification will be sent.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../com/parse/ParsePush.html#setData(org.json.JSONObject)">setData</a></strong>(<a href="http://developer.android.com/reference/org/json/JSONObject.html?is-external=true" title="class or interface in org.json">JSONObject</a>&nbsp;data)</code>
<div class="block">Sets the entire data of the push message.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../com/parse/ParsePush.html#setExpirationTime(long)">setExpirationTime</a></strong>(long&nbsp;time)</code>
<div class="block">Sets a UNIX epoch timestamp at which this notification should expire, in seconds (UTC).</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../com/parse/ParsePush.html#setExpirationTimeInterval(long)">setExpirationTimeInterval</a></strong>(long&nbsp;timeInterval)</code>
<div class="block">Sets the time interval after which this notification should expire, in seconds.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../com/parse/ParsePush.html#setMessage(java.lang.String)">setMessage</a></strong>(<a href="http://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;message)</code>
<div class="block">Sets the message that will be shown in the notification.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../com/parse/ParsePush.html#setPushToAndroid(boolean)">setPushToAndroid</a></strong>(boolean&nbsp;pushToAndroid)</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../com/parse/ParsePush.html#setPushToIOS(boolean)">setPushToIOS</a></strong>(boolean&nbsp;pushToIOS)</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../com/parse/ParsePush.html#setQuery(com.parse.ParseQuery)">setQuery</a></strong>(<a href="../../com/parse/ParseQuery.html" title="class in com.parse">ParseQuery</a>&lt;<a href="../../com/parse/ParseInstallation.html" title="class in com.parse">ParseInstallation</a>&gt;&nbsp;query)</code>
<div class="block">Sets the query for this push for which this push notification will be sent.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://boltsframework.github.io/docs/android/bolts/Task.html?is-external=true" title="class or interface in bolts">Task</a>&lt;<a href="http://developer.android.com/reference/java/lang/Void.html?is-external=true" title="class or interface in java.lang">Void</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../com/parse/ParsePush.html#subscribeInBackground(java.lang.String)">subscribeInBackground</a></strong>(<a href="http://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;channel)</code>
<div class="block">Adds 'channel' to the 'channels' list in the current <a href="../../com/parse/ParseInstallation.html" title="class in com.parse"><code>ParseInstallation</code></a> and saves it in
 a background thread.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../com/parse/ParsePush.html#subscribeInBackground(java.lang.String,%20com.parse.SaveCallback)">subscribeInBackground</a></strong>(<a href="http://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;channel,
                     <a href="../../com/parse/SaveCallback.html" title="interface in com.parse">SaveCallback</a>&nbsp;callback)</code>
<div class="block">Adds 'channel' to the 'channels' list in the current <a href="../../com/parse/ParseInstallation.html" title="class in com.parse"><code>ParseInstallation</code></a> and saves it in
 a background thread.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://boltsframework.github.io/docs/android/bolts/Task.html?is-external=true" title="class or interface in bolts">Task</a>&lt;<a href="http://developer.android.com/reference/java/lang/Void.html?is-external=true" title="class or interface in java.lang">Void</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../com/parse/ParsePush.html#unsubscribeInBackground(java.lang.String)">unsubscribeInBackground</a></strong>(<a href="http://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;channel)</code>
<div class="block">Removes 'channel' from the 'channels' list in the current <a href="../../com/parse/ParseInstallation.html" title="class in com.parse"><code>ParseInstallation</code></a> and saves
 it in a background thread.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../com/parse/ParsePush.html#unsubscribeInBackground(java.lang.String,%20com.parse.SaveCallback)">unsubscribeInBackground</a></strong>(<a href="http://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;channel,
                       <a href="../../com/parse/SaveCallback.html" title="interface in com.parse">SaveCallback</a>&nbsp;callback)</code>
<div class="block">Removes 'channel' from the 'channels' list in the current <a href="../../com/parse/ParseInstallation.html" title="class in com.parse"><code>ParseInstallation</code></a> and saves
 it in a background thread.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;<a href="http://developer.android.com/reference/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://developer.android.com/reference/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://developer.android.com/reference/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://developer.android.com/reference/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://developer.android.com/reference/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://developer.android.com/reference/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://developer.android.com/reference/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://developer.android.com/reference/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://developer.android.com/reference/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://developer.android.com/reference/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long,%20int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="ParsePush()">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>ParsePush</h4>
<pre>public&nbsp;ParsePush()</pre>
<div class="block">Creates a new push notification. The default channel is the empty string, also known as the
 global broadcast channel, but this value can be overridden using <a href="../../com/parse/ParsePush.html#setChannel(java.lang.String)"><code>ParsePush.setChannel(String)</code></a>,
 <a href="../../com/parse/ParsePush.html#setChannels(java.util.Collection)"><code>ParsePush.setChannels(Collection)</code></a> or <a href="../../com/parse/ParsePush.html#setQuery(com.parse.ParseQuery)"><code>ParsePush.setQuery(ParseQuery)</code></a>. Before sending the push
 notification you must call either <a href="../../com/parse/ParsePush.html#setMessage(java.lang.String)"><code>ParsePush.setMessage(String)</code></a> or <a href="../../com/parse/ParsePush.html#setData(org.json.JSONObject)"><code>ParsePush.setData(JSONObject)</code></a>.</div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="subscribeInBackground(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>subscribeInBackground</h4>
<pre>public static&nbsp;<a href="http://boltsframework.github.io/docs/android/bolts/Task.html?is-external=true" title="class or interface in bolts">Task</a>&lt;<a href="http://developer.android.com/reference/java/lang/Void.html?is-external=true" title="class or interface in java.lang">Void</a>&gt;&nbsp;subscribeInBackground(<a href="http://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;channel)</pre>
<div class="block">Adds 'channel' to the 'channels' list in the current <a href="../../com/parse/ParseInstallation.html" title="class in com.parse"><code>ParseInstallation</code></a> and saves it in
 a background thread.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>channel</code> - The channel to subscribe to.</dd>
<dt><span class="strong">Returns:</span></dt><dd>A Task that is resolved when the the subscription is complete.</dd></dl>
</li>
</ul>
<a name="subscribeInBackground(java.lang.String, com.parse.SaveCallback)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>subscribeInBackground</h4>
<pre>public static&nbsp;void&nbsp;subscribeInBackground(<a href="http://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;channel,
                         <a href="../../com/parse/SaveCallback.html" title="interface in com.parse">SaveCallback</a>&nbsp;callback)</pre>
<div class="block">Adds 'channel' to the 'channels' list in the current <a href="../../com/parse/ParseInstallation.html" title="class in com.parse"><code>ParseInstallation</code></a> and saves it in
 a background thread.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>channel</code> - The channel to subscribe to.</dd><dd><code>callback</code> - The SaveCallback that is called after the Installation is saved.</dd></dl>
</li>
</ul>
<a name="unsubscribeInBackground(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unsubscribeInBackground</h4>
<pre>public static&nbsp;<a href="http://boltsframework.github.io/docs/android/bolts/Task.html?is-external=true" title="class or interface in bolts">Task</a>&lt;<a href="http://developer.android.com/reference/java/lang/Void.html?is-external=true" title="class or interface in java.lang">Void</a>&gt;&nbsp;unsubscribeInBackground(<a href="http://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;channel)</pre>
<div class="block">Removes 'channel' from the 'channels' list in the current <a href="../../com/parse/ParseInstallation.html" title="class in com.parse"><code>ParseInstallation</code></a> and saves
 it in a background thread.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>channel</code> - The channel to unsubscribe from.</dd>
<dt><span class="strong">Returns:</span></dt><dd>A Task that is resolved when the the unsubscription is complete.</dd></dl>
</li>
</ul>
<a name="unsubscribeInBackground(java.lang.String, com.parse.SaveCallback)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unsubscribeInBackground</h4>
<pre>public static&nbsp;void&nbsp;unsubscribeInBackground(<a href="http://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;channel,
                           <a href="../../com/parse/SaveCallback.html" title="interface in com.parse">SaveCallback</a>&nbsp;callback)</pre>
<div class="block">Removes 'channel' from the 'channels' list in the current <a href="../../com/parse/ParseInstallation.html" title="class in com.parse"><code>ParseInstallation</code></a> and saves
 it in a background thread.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>channel</code> - The channel to unsubscribe from.</dd><dd><code>callback</code> - The SaveCallback that is called after the Installation is saved.</dd></dl>
</li>
</ul>
<a name="sendMessageInBackground(java.lang.String, com.parse.ParseQuery)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sendMessageInBackground</h4>
<pre>public static&nbsp;<a href="http://boltsframework.github.io/docs/android/bolts/Task.html?is-external=true" title="class or interface in bolts">Task</a>&lt;<a href="http://developer.android.com/reference/java/lang/Void.html?is-external=true" title="class or interface in java.lang">Void</a>&gt;&nbsp;sendMessageInBackground(<a href="http://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;message,
                                 <a href="../../com/parse/ParseQuery.html" title="class in com.parse">ParseQuery</a>&lt;<a href="../../com/parse/ParseInstallation.html" title="class in com.parse">ParseInstallation</a>&gt;&nbsp;query)</pre>
<div class="block">A helper method to concisely send a push message to a query. This method is equivalent to
 ParsePush push = new ParsePush(); push.setMessage(message); push.setQuery(query);
 push.sendInBackground();</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>message</code> - The message that will be shown in the notification.</dd><dd><code>query</code> - A ParseInstallation query which specifies the recipients of a push.</dd>
<dt><span class="strong">Returns:</span></dt><dd>A task that is resolved when the message is sent.</dd></dl>
</li>
</ul>
<a name="sendMessageInBackground(java.lang.String, com.parse.ParseQuery, com.parse.SendCallback)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sendMessageInBackground</h4>
<pre>public static&nbsp;void&nbsp;sendMessageInBackground(<a href="http://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;message,
                           <a href="../../com/parse/ParseQuery.html" title="class in com.parse">ParseQuery</a>&lt;<a href="../../com/parse/ParseInstallation.html" title="class in com.parse">ParseInstallation</a>&gt;&nbsp;query,
                           <a href="../../com/parse/SendCallback.html" title="interface in com.parse">SendCallback</a>&nbsp;callback)</pre>
<div class="block">A helper method to concisely send a push message to a query. This method is equivalent to
 ParsePush push = new ParsePush(); push.setMessage(message); push.setQuery(query);
 push.sendInBackground(callback);</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>message</code> - The message that will be shown in the notification.</dd><dd><code>query</code> - A ParseInstallation query which specifies the recipients of a push.</dd><dd><code>callback</code> - callback.done(e) is called when the send completes.</dd></dl>
</li>
</ul>
<a name="sendDataInBackground(org.json.JSONObject, com.parse.ParseQuery)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sendDataInBackground</h4>
<pre>public static&nbsp;<a href="http://boltsframework.github.io/docs/android/bolts/Task.html?is-external=true" title="class or interface in bolts">Task</a>&lt;<a href="http://developer.android.com/reference/java/lang/Void.html?is-external=true" title="class or interface in java.lang">Void</a>&gt;&nbsp;sendDataInBackground(<a href="http://developer.android.com/reference/org/json/JSONObject.html?is-external=true" title="class or interface in org.json">JSONObject</a>&nbsp;data,
                              <a href="../../com/parse/ParseQuery.html" title="class in com.parse">ParseQuery</a>&lt;<a href="../../com/parse/ParseInstallation.html" title="class in com.parse">ParseInstallation</a>&gt;&nbsp;query)</pre>
<div class="block">A helper method to concisely send a push to a query. This method is equivalent to ParsePush
 push = new ParsePush(); push.setData(data); push.setQuery(query); push.sendInBackground();</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>data</code> - The entire data of the push message. See the push guide for more details on the data
          format.</dd><dd><code>query</code> - A ParseInstallation query which specifies the recipients of a push.</dd>
<dt><span class="strong">Returns:</span></dt><dd>A task that is resolved when the data is sent.</dd></dl>
</li>
</ul>
<a name="sendDataInBackground(org.json.JSONObject, com.parse.ParseQuery, com.parse.SendCallback)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sendDataInBackground</h4>
<pre>public static&nbsp;void&nbsp;sendDataInBackground(<a href="http://developer.android.com/reference/org/json/JSONObject.html?is-external=true" title="class or interface in org.json">JSONObject</a>&nbsp;data,
                        <a href="../../com/parse/ParseQuery.html" title="class in com.parse">ParseQuery</a>&lt;<a href="../../com/parse/ParseInstallation.html" title="class in com.parse">ParseInstallation</a>&gt;&nbsp;query,
                        <a href="../../com/parse/SendCallback.html" title="interface in com.parse">SendCallback</a>&nbsp;callback)</pre>
<div class="block">A helper method to concisely send a push to a query. This method is equivalent to ParsePush
 push = new ParsePush(); push.setData(data); push.setQuery(query);
 push.sendInBackground(callback);</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>data</code> - The entire data of the push message. See the push guide for more details on the data
          format.</dd><dd><code>query</code> - A ParseInstallation query which specifies the recipients of a push.</dd><dd><code>callback</code> - callback.done(e) is called when the send completes.</dd></dl>
</li>
</ul>
<a name="setChannel(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setChannel</h4>
<pre>public&nbsp;void&nbsp;setChannel(<a href="http://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;channel)</pre>
<div class="block">Sets the channel on which this push notification will be sent. The channel name must start with
 a letter and contain only letters, numbers, dashes, and underscores. A push can either have
 channels or a query. Setting this will unset the query.</div>
</li>
</ul>
<a name="setChannels(java.util.Collection)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setChannels</h4>
<pre>public&nbsp;void&nbsp;setChannels(<a href="http://developer.android.com/reference/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="http://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;channels)</pre>
<div class="block">Sets the collection of channels on which this push notification will be sent. Each channel name
 must start with a letter and contain only letters, numbers, dashes, and underscores. A push can
 either have channels or a query. Setting this will unset the query.</div>
</li>
</ul>
<a name="setQuery(com.parse.ParseQuery)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setQuery</h4>
<pre>public&nbsp;void&nbsp;setQuery(<a href="../../com/parse/ParseQuery.html" title="class in com.parse">ParseQuery</a>&lt;<a href="../../com/parse/ParseInstallation.html" title="class in com.parse">ParseInstallation</a>&gt;&nbsp;query)</pre>
<div class="block">Sets the query for this push for which this push notification will be sent. This query will be
 executed in the Parse cloud; this push notification will be sent to Installations which this
 query yields. A push can either have channels or a query. Setting this will unset the channels.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>query</code> - A query to which this push should target. This must be a ParseInstallation query.</dd></dl>
</li>
</ul>
<a name="setExpirationTime(long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setExpirationTime</h4>
<pre>public&nbsp;void&nbsp;setExpirationTime(long&nbsp;time)</pre>
<div class="block">Sets a UNIX epoch timestamp at which this notification should expire, in seconds (UTC). This
 notification will be sent to devices which are either online at the time the notification is
 sent, or which come online before the expiration time is reached. Because device clocks are not
 guaranteed to be accurate, most applications should instead use
 <a href="../../com/parse/ParsePush.html#setExpirationTimeInterval(long)"><code>ParsePush.setExpirationTimeInterval(long)</code></a>.</div>
</li>
</ul>
<a name="setExpirationTimeInterval(long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setExpirationTimeInterval</h4>
<pre>public&nbsp;void&nbsp;setExpirationTimeInterval(long&nbsp;timeInterval)</pre>
<div class="block">Sets the time interval after which this notification should expire, in seconds. This
 notification will be sent to devices which are either online at the time the notification is
 sent, or which come online within the given number of seconds of the notification being
 received by Parse's server. An interval which is less than or equal to zero indicates that the
 message should only be sent to devices which are currently online.</div>
</li>
</ul>
<a name="clearExpiration()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clearExpiration</h4>
<pre>public&nbsp;void&nbsp;clearExpiration()</pre>
<div class="block">Clears both expiration values, indicating that the notification should never expire.</div>
</li>
</ul>
<a name="setPushToIOS(boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPushToIOS</h4>
<pre><a href="http://developer.android.com/reference/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;void&nbsp;setPushToIOS(boolean&nbsp;pushToIOS)</pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;</div>
</li>
</ul>
<a name="setPushToAndroid(boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPushToAndroid</h4>
<pre><a href="http://developer.android.com/reference/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;void&nbsp;setPushToAndroid(boolean&nbsp;pushToAndroid)</pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;</div>
</li>
</ul>
<a name="setData(org.json.JSONObject)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setData</h4>
<pre>public&nbsp;void&nbsp;setData(<a href="http://developer.android.com/reference/org/json/JSONObject.html?is-external=true" title="class or interface in org.json">JSONObject</a>&nbsp;data)</pre>
<div class="block">Sets the entire data of the push message. See the push guide for more details on the data
 format. This will overwrite any data specified in <a href="../../com/parse/ParsePush.html#setMessage(java.lang.String)"><code>ParsePush.setMessage(String)</code></a>.</div>
</li>
</ul>
<a name="setMessage(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMessage</h4>
<pre>public&nbsp;void&nbsp;setMessage(<a href="http://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;message)</pre>
<div class="block">Sets the message that will be shown in the notification. This will overwrite any data specified
 in <a href="../../com/parse/ParsePush.html#setData(org.json.JSONObject)"><code>ParsePush.setData(JSONObject)</code></a>.</div>
</li>
</ul>
<a name="sendInBackground()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sendInBackground</h4>
<pre>public&nbsp;<a href="http://boltsframework.github.io/docs/android/bolts/Task.html?is-external=true" title="class or interface in bolts">Task</a>&lt;<a href="http://developer.android.com/reference/java/lang/Void.html?is-external=true" title="class or interface in java.lang">Void</a>&gt;&nbsp;sendInBackground()</pre>
<div class="block">Sends this push notification in a background thread. Use this when you do not have code to run
 on completion of the push.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>A Task is resolved when the push has been sent.</dd></dl>
</li>
</ul>
<a name="send()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>send</h4>
<pre>public&nbsp;void&nbsp;send()
          throws <a href="../../com/parse/ParseException.html" title="class in com.parse">ParseException</a></pre>
<div class="block">Sends this push notification while blocking this thread until the push notification has
 successfully reached the Parse servers. Typically, you should use <a href="../../com/parse/ParsePush.html#sendInBackground()"><code>ParsePush.sendInBackground()</code></a>
 instead of this, unless you are managing your own threading.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../com/parse/ParseException.html" title="class in com.parse">ParseException</a></code> - Throws an exception if the server is inaccessible.</dd></dl>
</li>
</ul>
<a name="sendInBackground(com.parse.SendCallback)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>sendInBackground</h4>
<pre>public&nbsp;void&nbsp;sendInBackground(<a href="../../com/parse/SendCallback.html" title="interface in com.parse">SendCallback</a>&nbsp;callback)</pre>
<div class="block">Sends this push notification in a background thread. This is preferable to using
 <code>send()</code>, unless your code is already running from a background thread.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>callback</code> - callback.done(e) is called when the send completes.</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../com/parse/package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/ParsePush.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../com/parse/ParseObject.html" title="class in com.parse"><span class="strong">Prev Class</span></a></li>
<li><a href="../../com/parse/ParsePushBroadcastReceiver.html" title="class in com.parse"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?com/parse/ParsePush.html" target="_top">Frames</a></li>
<li><a href="ParsePush.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
